#pragma once
#include <map>
#include <QString>

class CEnviFilter 
{
public:
	CEnviFilter();
	~CEnviFilter();

public:
	int m_nFilterType;
	int m_nChgDisp; //-1,不启用；0，报价和修改报价同时显示；1，只显示报价。
	bool m_bIsDispScheme;
	bool m_bEnableChgDisp;
	QString	m_strId;
	std::map<int, bool> m_mapBroker;
public:
	void SetFatherKey(const QString& strKey);
protected:
	QString	m_strFatherKey;
	QString	m_strSection;
public:
	void LoadEnviFilter();
	void LoadCorp();

	void SaveEnviFilter();
	void SaveCorp();
	void SaveEnvi();
public:
	bool IsGroupExist(const QString &strGroupID);
	bool IsConditionExist(const QString &strGroupID);
public:
	void SetCorpLoadFlag(bool bFlag){m_bCorpLoadFlag = bFlag;}
protected:
	bool m_bCorpLoadFlag;
protected:
	bool IsSelected(const QString &strKey);
	QString	GetIniString(const QString &strKey);
	void SetIniString(const QString &strKey,const QString &strValue);
public:
	static QString AssembleID(int nType,const QString &strID);
	static int SplitID(const QString &strSrv,QString& strID);
};